﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="IDM.Web.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>IDM - Vstopna Točka</title>    
	<link href="Style/main.css" rel="stylesheet" type="text/css" />
	
	<script type="text/javascript">
	function toolClicked(tool){
		switch(tool){			
			case 'help':
				Ext.getCmp('HelpWindow').show();
			break;			
		}
	}
	</script>
</head>
<body>
    <form id="MainForm" runat="server">
    <ext:ResourceManager runat="server">
    <Listeners>
		<DocumentReady Handler="#{UserName}.focus(150);" />
    </Listeners>
    </ext:ResourceManager>
    
    <ext:Viewport runat="server" Layout="Fit">
    <Content>
    
		<ext:Panel runat="server" Layout="VBoxLayout">
		<LayoutConfig>
			<ext:VBoxLayoutConfig Align="Center" Pack="Center" />
		</LayoutConfig>
		<Content>
	    
			<ext:FormPanel runat="server" ID="LoginForm"
				ButtonAlign="Right"
				Width="350"
				Title="Login"
				Padding="10"
				LabelAlign="Right"
				MonitorPoll="500"
				MonitorValid="true"
				LabelWidth="60">
			<Tools>				
				<ext:Tool Type="Help" Qtip="Help" Handler="toolClicked('help');"></ext:Tool>
			</Tools>
			<Defaults>
				<ext:Parameter Name="Anchor" Value="95%"></ext:Parameter>
				<ext:Parameter Name="AllowBlank" Value="false" Mode="Raw"></ext:Parameter>
				<ext:Parameter Name="MsgTarget" Value="under"></ext:Parameter>				
			</Defaults>
			<Items>
				<ext:TextField runat="server" ID="UserName"
					FieldLabel="Username"
					MinLengthText="6"
					Text="admin"
					BlankText="Enter username...">
				</ext:TextField>
				<ext:TextField runat="server" ID="Password"					
					FieldLabel="Password"
					BlankText="Enter password..."	
					Text="admin12"				
					InputType="Password">
				</ext:TextField>
			</Items>
			<Buttons>			
				<ext:Button runat="server" ID="LoginBtn"
					Text="Login"
					Icon="LockKey"
					Disabled="true">
				<DirectEvents>
					<Click OnEvent="Login_Click">
						<EventMask ShowMask="true" />
					</Click>
				</DirectEvents>
				</ext:Button>
			</Buttons>
			<Listeners>
				<ClientValidation Handler="#{LoginBtn}.setDisabled(!valid);" />
			</Listeners>
			<KeyMap>
				<ext:KeyBinding StopEvent="true">
				<Keys>
					<ext:Key Code="ENTER" />
				</Keys>
				<Listeners>
					<Event Handler="#{LoginBtn}.fireEvent('click');" />
				</Listeners>
				</ext:KeyBinding>
			</KeyMap>
			</ext:FormPanel>
		</Content>
	    
		</ext:Panel>
		
		<ext:Window runat="server" ID="HelpWindow"
			Title="Help"
			Width="500"
			Height="400"
			Modal="true"
			Hidden="true">
		<AutoLoad ShowMask="true" Url="Help.htm"></AutoLoad>
		<Buttons>
			<ext:Button runat="server" 
				Text="Close">
			<Listeners>
				<Click Handler="#{HelpWindow}.hide();" />
			</Listeners>
			</ext:Button>
		</Buttons>
		</ext:Window>
		
		</Content>
    </ext:Viewport>    
    
    
    </form>
</body>
</html>
